package homework.course.role;

import homework.util.observer.Observable;
import homework.util.observer.Observer;

public class Main {

    public static void main(String[] args) {
        Student std = Student.getInstance("17121617", "童世新");
        std.addObserver(new Observer() {
            @Override
            public void receive(Observable observable, Object obj) {
                System.out.println(observable.toString()+obj);
            }
        });

        String[] strings = {"A", "B", "C", "D", "E", "F", "G", "HHHH", "test", "cccc", "DDDD"};
        for(int i=0;i<3;i++)
        for(String each: strings) {
            std.listen("TEACHER", each);
        }
    }
}
